<template>
  <div>
      <h1 class="title">标题</h1>
      <p>内容</p>
      <input type="button" value="确认框" @click="clickBtn">
      <Dialog v-if="isMask" :propsItem="propsItem" @child-ok="childok" @child-cancel="childcancel"></Dialog>
  </div>
</template>

<script>
import Dialog from './dialog'
export default {
  name:"d1demo",
  data(){
      return {
        isMask:false,
        propsItem:{
            title:'标题',
            contents:'ccccc',
            ok:'确认',
            cancel:'取消',
            isMask:true,
            rgba:false,
            widthHeight:{
                width:'300px',
                height:'300px'
            }
        }
      }
  },
  components:{
      Dialog
  },
  methods:{
      clickBtn(){
          this.propsItem.isMask = this.isMask = true
      },
    childok(){
      alert('xxx')
    },
    childcancel(){
    }
  }
}
</script>

<style lang="less" scoped>

</style>

